# /usr/bin/env python3.6
# -*- encoding: utf-8 -*-
"""
@File    : __init__.py.py
@Time    : 2020/2/2 0002 11:03
@Author  : zhangbing
@Email   : 18829172841@163.com
@Software: PyCharm
"""
from . import user, post, file
from App.views.api import GoodsList
from flask_restful import Resource, Api

api = Api()


def view_init(app):
    app.register_blueprint(user.userauth, url_prefix='/user/')
    app.register_blueprint(post.postauth, url_prefix='/post/')
    app.register_blueprint(file.fileedit, url_prefix='/file/')
    api.init_app(app)


api.add_resource(GoodsList, '/api/<int:id>/', endpoint='api')
